var e = require;
var t = module;
var o = exports;
Object.defineProperty(o, "__esModule", {value: !0});
var n = e("BaseModuleUI"),
    a = e("AudioManager"),
    i = e("Game"),
    r = cc._decorator,
    s = r.ccclass,
    l = r.property,
    c = (function (e) {
        function t() {
            var t = (null !== e && e.apply(this, arguments)) || this;
            return (
                (t.level_up_ske = null),
                (t.role_buff_ske = null),
                (t.birth_light_ske = null),
                (t.home_heal_ske = null),
                (t.player_skill_ske = null),
                (t.fill_ske = null),
                (t.clock_ske = null),
                (t.sprint_node = null),
                (t.coin_system = null),
                t
            );
        }
        return (
            __extends(t, e),
            (t.prototype.showEffectInfo = function (e) {
                var t = this;
                switch (e) {
                    case i.RoleEffectType.level_up:
                        this.showLevelUpEffect();
                        break;
                    case i.RoleEffectType.my_birth_light:
                        (this.birth_light_ske.defaultSkin = "green"),
                            a.default.getInstance().playFx("my_birth"),
                            this.showBirthLightEffect();
                        break;
                    case i.RoleEffectType.other_birth_light:
                        (this.birth_light_ske.defaultSkin = "blue"), this.showBirthLightEffect();
                        break;
                    case i.RoleEffectType.blue_buff:
                        (this.node.zIndex = 1),
                            (this.role_buff_ske.node.active = !0),
                            this.role_buff_ske.setAnimation(0, "blue_buff", !0),
                            this.scheduleOnce(function () {
                                t.node.destroy();
                            }, 40);
                        break;
                    case i.RoleEffectType.red_buff:
                        (this.node.zIndex = 2),
                            (this.role_buff_ske.node.active = !0),
                            this.role_buff_ske.setAnimation(0, "red_buff", !0),
                            this.scheduleOnce(function () {
                                t.node.destroy();
                            }, 40);
                        break;
                    case i.RoleEffectType.dragon_buff:
                        (this.node.zIndex = 3),
                            (this.role_buff_ske.node.active = !0),
                            this.role_buff_ske.setAnimation(0, "dragon_buff", !0),
                            this.scheduleOnce(function () {
                                t.node.destroy();
                            }, 60);
                        break;
                    case i.RoleEffectType.home_heal:
                        (this.node.zIndex = 6),
                            (this.home_heal_ske.node.active = !0),
                            this.home_heal_ske.setAnimation(0, "animation", !0);
                        break;
                    case i.RoleEffectType.kill:
                        (this.node.zIndex = 6),
                            (this.node.scaleX = -1),
                            (this.player_skill_ske.node.active = !0),
                            this.player_skill_ske.setAnimation(0, "kill", !1),
                            this.player_skill_ske.setCompleteListener(function () {
                                t.player_skill_ske.setCompleteListener(null), t.node.destroy();
                            });
                        break;
                    case i.RoleEffectType.heal:
                        (this.node.zIndex = 6),
                            (this.player_skill_ske.node.active = !0),
                            this.player_skill_ske.setAnimation(0, "heal", !1),
                            this.player_skill_ske.setCompleteListener(function () {
                                t.player_skill_ske.setCompleteListener(null), t.node.destroy();
                            });
                        break;
                    case i.RoleEffectType.fill:
                        (this.node.zIndex = 6),
                            (this.fill_ske.node.active = !0),
                            this.fill_ske.setAnimation(0, "dragon", !1),
                            this.fill_ske.setCompleteListener(function () {
                                t.fill_ske.setCompleteListener(null), t.node.destroy();
                            });
                        break;
                    case i.RoleEffectType.clock:
                        (this.node.zIndex = 6),
                            (this.clock_ske.node.active = !0),
                            this.clock_ske.setAnimation(0, "zuzou_clock", !1),
                            this.clock_ske.setCompleteListener(function () {
                                t.clock_ske.setCompleteListener(null), t.node.destroy();
                            });
                        break;
                    case i.RoleEffectType.sprint:
                        (this.node.zIndex = 3),
                            (this.sprint_node.active = !0),
                            this.sprint_node.getComponent(cc.ParticleSystem).resetSystem(),
                            (this.node.scaleX = -1),
                            this.scheduleOnce(function () {
                                (t.sprint_node.active = !1), t.node.destroy();
                            }, 5);
                        break;
                    case i.RoleEffectType.coin:
                        (this.node.zIndex = 7),
                            (this.coin_system.node.active = !0),
                            a.default.getInstance().playFx("bome_coin"),
                            this.coin_system.resetSystem(),
                            this.scheduleOnce(function () {
                                t.coin_system.node.active = !1;
                            }, 1);
                }
            }),
            (t.prototype.showLevelUpEffect = function () {
                var e = this;
                (this.node.zIndex = 5),
                    (this.level_up_ske.node.active = !0),
                    this.level_up_ske.setAnimation(0, "levelup", !1),
                    (this.level_up_ske.timeScale = 0.8),
                    this.level_up_ske.setCompleteListener(function () {
                        e.node.destroy();
                    });
            }),
            (t.prototype.showBirthLightEffect = function () {
                var e = this;
                (this.node.zIndex = 0),
                    (this.birth_light_ske.node.active = !0),
                    this.birth_light_ske.setAnimation(0, "birth", !1),
                    this.birth_light_ske.setCompleteListener(function () {
                        e.node.destroy();
                    });
            }),
            __decorate([l(sp.Skeleton)], t.prototype, "level_up_ske", void 0),
            __decorate([l(sp.Skeleton)], t.prototype, "role_buff_ske", void 0),
            __decorate([l(sp.Skeleton)], t.prototype, "birth_light_ske", void 0),
            __decorate([l(sp.Skeleton)], t.prototype, "home_heal_ske", void 0),
            __decorate([l(sp.Skeleton)], t.prototype, "player_skill_ske", void 0),
            __decorate([l(sp.Skeleton)], t.prototype, "fill_ske", void 0),
            __decorate([l(sp.Skeleton)], t.prototype, "clock_ske", void 0),
            __decorate([l(cc.Node)], t.prototype, "sprint_node", void 0),
            __decorate([l(cc.ParticleSystem)], t.prototype, "coin_system", void 0),
            __decorate([s], t)
        );
    })(n.default);
o.default = c;
